The invention relates to stream format conversion, more specifically to converting data from a transport stream (TS) format to a program stream (PS) format.
Techniques and applications for recording broadcast data on a hard disk of a digital television (TV) receiver or a set-top box (STB) have lately drawn much attention. Broadcast data, such as National Television System Committee (NTSC)/Phase Alternation by Line (PAL) type broadcast data, is encoded into a Moving Picture Experts Group (MPEG) stream by a multimedia encoder. The multimedia encoders provide data compression to allow video and audio data to be transferred, stored, and played in a computer environment. In MPEG systems, several types of multimedia information are combined into one stream that can be either transmitted on a single communication channel or stored in one file of a digital storage medium (DSM). MPEG has defined three types of non-elementary streams comprising program stream (PS), transport stream (TS), and packetized elementary stream (PES).
A program stream (PS) only carries one program, and is designed for applications having negligible transmission errors, for example, DSM or networks having correctable or negligible transmission errors. Packs of multiplexed audio and video data in a PS consist of pack headers followed by a variable number of multiplexed PES packets. A transport stream (TS) carries several programs, and is designed for applications having non-negligible transmission error. A TS also comprises multiplexed PES data. Specifically, variable length PES packets are typically packetized into shorter TS packets of fixed length (188 bytes) for transmission.
For digital data that is encoded in TS format for transmission, recording methods are known that directly record the transmitted digital data in the TS format such as onto a hard disk. The TS format data recorded on such hard disk, however, is difficult to modify or manage. Additionally, since the volume of data carried by the TS format data is relatively large, the limited capacity of the hard disk can become an issue to TS applications. Other recording methods solve the above drawbacks by first decoding the transmitted digital data that has encoded in TS. The decoded data is then encoded into PS for data storage. However, an MPEG encoding and decoding system is required for implementing such a method that typically increases cost and complexity of the entire system.